#include<stdio.h>
#include<unistd.h>

#define         BUFFSIZE 4096
int main(int argc,char **argv)
{
    int          rv=-1;
    char         buf[BUFFSIZE];

    while((rv=read(STDIN_FILENO,buf,sizeof(buf))) > 0)
         if(write(STDOUT_FILENO,buf,rv) != rv)
             printf("write error\n");

    if(rv<0)
        printf("read error\n");

    return 0;
}
